<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" Inherits="AbleCommerce.Admin.Shipping.Providers.FedEx.Configure" title="Configure FedEx&reg;" Codebehind="Configure.aspx.cs" %>
<%@ Register Src="../ProviderShipMethods.ascx" TagName="ShipMethods" TagPrefix="uc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
    <div class="pageHeader">
	    <div class="caption">
		    <h1>Configure FedEx&reg;</h1>
	    </div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="content">
                <cb:Notification ID="SavedMessage" runat="server" Text="Configuration has been saved at {0:t}." SkinID="GoodCondition" EnableViewState="false" Visible="false"></cb:Notification>
                <table class="inputForm" width="100%">                               
                    <tr>
                        <th class="rowHeader" style="width:30%">
                            Integration Version:
                        </th>
                        <td>
                            <asp:Literal ID="IntegrationVersion" runat="server" EnableViewState="false"></asp:Literal>
                        </td>
                    </tr>
                    <tr id="trInstanceName" runat="server" visible="false">
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="NameLabel" runat="server" Text="Instance Name:" ToolTip="The name for this instance." />
                        </th>
                        <td>
                            <asp:TextBox ID="InstanceName" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="LabelFedExKey" runat="server" Text="Key:" EnableViewState="false" ToolTip="This is your FedEx authentication key." />
                        </th>
                        <td>
				            <asp:TextBox ID="FedExKey" runat="server" Text="${Key}" Width="200"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="FedExPasswordLabel" runat="server" Text="Password:" ToolTip="This is your FedEx authentication password."/>
                        </th>
                        <td>
				            <asp:TextBox ID="FedExPassword" runat="server" Text="${Password}" Width="200"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="AccountNameLabel" runat="server" Text="Account Number:" ToolTip="This is your FedEx Account Number."/>
                        </th>
                        <td>
				            <asp:TextBox ID="AccountNameDisplay" runat="server" Text="${AccountName}"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="MeterNumberLabel" runat="server" Text="Meter Number:" ToolTip="This is your FedEx Meter Number."/>
                        </th>
                        <td>
				            <asp:TextBox ID="MeterNumberDisplay" runat="server" Text="${MeterNumber}"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="PackagingTypeLabel" runat="server" Text="Packaging Type:" ToolTip="How are the shipments packaged?"/>
                        </th>
                        <td>
                            <asp:DropDownList ID="PackagingType" runat="server">                         
                            </asp:DropDownList>
                        </td>
                    </tr>            
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="DropOffTypeLabel" runat="server" Text="Drop Off Type:" ToolTip="How the packages are to be submitted to FedEx?" />
                        </th>
                        <td>
                            <asp:DropDownList ID="DropOffType" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="EnablePackageBreakupLabel" runat="server" Text="Enable Package Breakup:" ToolTip="If weight of a package exceeds maximum carrier weight, should it be broken into smaller packages?" />
                        </th>
                        <td>
                            <asp:RadioButtonList ID="EnablePackageBreakup" runat="server" RepeatDirection="Vertical">
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="0"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="IncludeDeclaredValueLabel" runat="server" Text="Include Declared Value For Insurance:" ToolTip="Should the declared value of the shipment be included in rate requests for insurance?" />
                        </th>
                        <td>
                            <asp:RadioButtonList ID="IncludeDeclaredValue" runat="server" RepeatDirection="Vertical">
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="0"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="MaxPackageWeightLabel" runat="server" Text="Maximum Package Weight:" ToolTip="The maximum weight of a package that the carrier allows." />
                        </th>
                        <td>
				            <asp:TextBox Width="60" ID="MaxPackageWeight" runat="server" Text="${MaxPackageWeight}"></asp:TextBox>lbs
                        </td>
                    </tr>
                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="MinPackageWeightLabel" runat="server" Text="Minimum Package Weight:" ToolTip="The minimum weight of a package that the carrier allows." />
                        </th>
                        <td>
				            <asp:TextBox Width="60" ID="MinPackageWeight" runat="server" Text="${MinPackageWeight}"></asp:TextBox>lbs
                        </td>
                    </tr>

                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="TrackingURLLabel" runat="server" Text="Tracking URL:" ToolTip="The URL to which requests are sent for package tracking. {0} is substituted with the tracking number at the time of request." />
                        </th>
                        <td>
				            <asp:TextBox Width="300" ID="TrackingURL" runat="server" Text="${TrackingURL}"></asp:TextBox>
                        </td>
                    </tr>

				    <tr>
                        <th class="rowHeader" valign="top">
                            <cb:ToolTipLabel ID="UseTestModeLabel" runat="server" Text="Gateway Mode:" ToolTip="Use test mode to verify your integration is working with your development development.  Use live mode with your production key during store operation." />
                        </th>
                        <td valign="top">
                            <asp:RadioButtonList ID="UseTestMode" runat="server" RepeatDirection="Vertical">
                                <asp:ListItem Text="Live Mode" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Test Mode" Value="1"></asp:ListItem>
                            </asp:RadioButtonList>
                            <asp:PlaceHolder ID="TestModeMessage" runat="server" Visible="false">
                                <br />
                                <b>Note:</b> You need a production key to use Live Mode. If you don't have one you can request it at the <a href="http://fedex.com/us/developer/" target="_blank">FedEx Developer Resource Center</a>.  When logged in, access Technical Resources > FedEx Web Services for Shipping > Move to Production.  Click the link at the bottom of the page to obtain a production key.
                            </asp:PlaceHolder>
                        </td>
                    </tr>

                    <tr>
                        <th class="rowHeader">
                            <cb:ToolTipLabel ID="UseDebugLabel" runat="server" Text="Debug Mode:" ToolTip="When debug mode is enabled, all messages sent to and received from FedEx are logged. This should only be enabled at the direction of qualified support personnel." />
                        </th>
                        <td>
                            <asp:RadioButtonList ID="UseDebugMode" runat="server" RepeatDirection="Vertical">
                                <asp:ListItem Text="Disabled" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Enabled" Value="1"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>

                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <asp:Button ID="DeleteButton" runat="server" Text="Delete" OnClick="DeleteButton_Click" CausesValidation="false" OnClientClick="javascript:return confirm('Are you sure you wish to delete your registration and disable the features of FedEx?')" />                                
                            <asp:Button ID="SaveButton" runat="server" Text="Save" OnClick="SaveButton_Click" />
                            <asp:Button ID="SaveAndCloseButton" runat="server" Text="Save and Close" SkinID="SaveButton" OnClick="SaveAndCloseButton_Click"></asp:Button>
						    <asp:Button ID="CancelButton" runat="server" Text="Cancel" SkinID="CancelButton" OnClick="CancelButton_Click" CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="section">
        <uc1:ShipMethods id="ShipMethods1" runat="server" />
    </div>
	<div align="center">
	    <asp:Label ID="FedExCopyRight" runat="server" Text="FedEx and FedEx brandmark are trademarks of FedEx Inc. All Rights Reserved." SkinID="Copyright"></asp:Label>
	</div>
</asp:Content>
